package LearnWork;

/*2014-8-8
 * 作業4 : String s1[ ] = snum.split("[.]");  
 * 使用split()將字串分離，利用一個網址測試 
 */


public class StringSplit {

	public static void main(String[] args) {
		String s1 = "www.google.com.tw";
		String[] s2 = s1.split("[.]");		
		System.out.println("原本:"+s1);
		System.out.print("後來:");
		for(int i = 0 ; i<s2.length ; i++){
			System.out.print(s2[i]+" ");
		}
		System.out.println();
	}
}
